<% if @printer.errors.any? %>
    <div class="row">
        <div class="col-md-12">
          <div class="alert alert-danger">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            <ul>
              <% @printer.errors.full_messages.each do |message| %>
                <li><%= message %></li>
              <% end %>                     
            </ul>                                             
          </div>
        </div>
 </div>
<% end %>

<div class="form-group">
  <label class="col-md-12">打印机名称(放置位置)*</label>
  <div class="col-md-12">
       <%= f.text_field :name,class:"form-control",label:false,placeholder:"请输入打印机名称(放置位置)"%>
  </div>
</div>

<div class="form-group">
  <label class="col-md-12">打印机key*</label>
  <div class="col-md-12">
       <%= f.text_field :key,class:"form-control",label:false,placeholder:"请输入打印机key"%>
  </div>
</div>

<div class="form-group">
  <label class="col-md-12">打印机编号*</label>
  <div class="col-md-12">
       <%= f.text_field :sn,class:"form-control",label:false,placeholder:"请输入打印机编号"%>
  </div>
</div>

<div class="form-group m-b-0">
    <div class="col-sm-offset-3 col-sm-9">
      <button type="submit" class="btn btn-info waves-effect waves-light m-t-10">确定</button>
      <%= link_to("取消", "/restaurants/printers" , class:"btn btn-default waves-effect waves-light m-t-10") %>
    </div>
</div>
